<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditReservationsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationID}" for="reservationID" />
                    <h:inputText id="reservationID" value="#{reservationsController.selected.reservationID}" title="#{bundle.EditReservationsTitle_reservationID}" required="true" requiredMessage="#{bundle.EditReservationsRequiredMessage_reservationID}"/>
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationDate}" for="reservationDate" />
                    <h:inputText id="reservationDate" value="#{reservationsController.selected.reservationDate}" title="#{bundle.EditReservationsTitle_reservationDate}" required="true" requiredMessage="#{bundle.EditReservationsRequiredMessage_reservationDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationTime}" for="reservationTime" />
                    <h:inputText id="reservationTime" value="#{reservationsController.selected.reservationTime}" title="#{bundle.EditReservationsTitle_reservationTime}" >
                        <f:convertDateTime pattern="HH:mm:ss" />
                    </h:inputText>
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationName}" for="reservationName" />
                    <h:inputText id="reservationName" value="#{reservationsController.selected.reservationName}" title="#{bundle.EditReservationsTitle_reservationName}" />
                    <h:outputLabel value="#{bundle.EditReservationsLabel_numberOfGuests}" for="numberOfGuests" />
                    <h:inputText id="numberOfGuests" value="#{reservationsController.selected.numberOfGuests}" title="#{bundle.EditReservationsTitle_numberOfGuests}" />
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationPhone}" for="reservationPhone" />
                    <h:inputText id="reservationPhone" value="#{reservationsController.selected.reservationPhone}" title="#{bundle.EditReservationsTitle_reservationPhone}" />
                    <h:outputLabel value="#{bundle.EditReservationsLabel_reservationEmail}" for="reservationEmail" />
                    <h:inputText id="reservationEmail" value="#{reservationsController.selected.reservationEmail}" title="#{bundle.EditReservationsTitle_reservationEmail}" />
                </h:panelGrid>
                <h:commandLink action="#{reservationsController.update}" value="#{bundle.EditReservationsSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditReservationsViewLink}"/>
                <br />
                <h:commandLink action="#{reservationsController.prepareList}" value="#{bundle.EditReservationsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditReservationsIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
